#ifndef _COMPONENT_H_
#define _COMPONENT_H_

#include "../device/Device.h"
#include "../virtual/Virtual.h"

/*
	class : Component
	desc : This class is used to create an
		interface for dealing with and
		configuring components on devices.
		
*/
template<typename ConfigStruct, typename DataStruct>
class Component : public Device
{
	protected:
		//holds the configuration of component.
		//for easy configuration.
		ConfigStruct configuration;
		//holds the data of the component for easy retrieval
		DataStruct data;
	public :
		//configures the device
		virtual void config(){};
		//reconfigures the device and configures the minimal
		//amount...
		void reconfig(ConfigStruct configuration)
		{this->configuration=configuration;}
		//gets the current configuration.
		ConfigStruct getConfig(){return configuration;}
		//sets the data struct to d
		void set(DataStruct d){data = d;}
		//gets the data struct in component...
		DataStruct get(){return data;}
		//runs the component up to user to decide
		//how to do though so might not really be 
		//used depending on the device.
		virtual void run(){};	
};

/*
	namespace : Hardware
	desc : Namespace for hardware components to help keep things organized.
*/
namespace Hardware{};



#endif
